IOMMU/MMU: enhance the call trees of IOMMU unmapping and mapping
authorQuan Xu <quan.xu@intel.com>
Tue, 14 Jun 2016 13:11:48 +0000 (15:11 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 14 Jun 2016 13:11:48 +0000 (15:11 +0200)
commite5bcd2f779fafe72339685ad9bafe2751517fae7
tree327489be77ed3be3c12f3a0e55f445ff197db93c
parent834c97baebb3743c54bcae228e984ae1b9692e6a
IOMMU/MMU: enhance the call trees of IOMMU unmapping and mapping

When IOMMU mapping is failed, we issue a best effort rollback, stopping
IOMMU mapping, unmapping the previous IOMMU maps and then reporting the
error up to the call trees. When rollback is not feasible (in early
initialization phase or trade-off of complexity) for the hardware domain,
we do things on a best effort basis, only throwing out an error message.

IOMMU unmapping should continue despite an error, in an attempt to do
best effort cleanup.

Signed-off-by: Quan Xu <quan.xu@intel.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
xen/arch/x86/mm.c
xen/arch/x86/mm/p2m-ept.c
xen/arch/x86/mm/p2m-pt.c
xen/arch/x86/mm/p2m.c
xen/arch/x86/x86_64/mm.c
xen/drivers/passthrough/amd/pci_amd_iommu.c
xen/drivers/passthrough/iommu.c
xen/drivers/passthrough/vtd/x86/vtd.c
xen/include/xen/iommu.h